import request from '@/utils/request'

/**
 * 查询用户接口
 * */
export const GetUserList = params => request({
  url: '/api/admin/user/getUserList',
  method: 'get',
  params
})

/**
 * addUser 添加接口
 */
export const addUser = data => request({
  url: '/api/admin/user/addUser',
  method: 'post',
  data
})

/**
 * 删除接口 delUser
 */
export const delUser = data => request({
  url: '/api/admin/user/delUser',
  method: 'post',
  data
})


/**
 * editUser 修改接口
 */

export const editUser = data => request({
  url: '/api/admin/user/editUser',
  method: 'post',
  data
})

// --------------------------------------------------角色--------------------------------------------------------------

/**
 * 查询角色接口
 * */
export const getRoleList = params => request({
  url: '/api/admin/user/getRoleList',
  method: 'get',
  params
})

/**
 * addRole 添加接口
 */
export const addRole = data => request({
  url: '/api/admin/user/addRole',
  method: 'post',
  data
})

/**
 * 删除接口 delRole
 */
export const delRole = data => request({
  url: '/api/admin/user/delRole',
  method: 'post',
  data
})


/**
 * editRole 修改接口
 */

export const editRole = data => request({
  url: '/api/admin/user/editRole',
  method: 'post',
  data
})
